//
//  NemoCustomLayoutElement+NemoReference.m
//  NemoSDKDemo
//
//  Created by 许宝吉 on 2019/2/27.
//  Copyright © 2019 JackYang. All rights reserved.
//

#import "NemoCustomLayoutElement+NemoReference.h"

@implementation NemoCustomLayoutElement (NemoReference)

- (instancetype)initWithVideoResolution:(NemoVideoResolution)videoResolution
                          participantId:(int)participantId
                               priority:(NemoLayoutPriority)priority
                                quality:(NemoVideoQuality)quality
{
    self = [super init];
    if (self) {
        self.resolution = videoResolution;
        self.participantId = participantId;
        self.priority = priority;
        self.quality = quality;
    }
    return self;
}

+ (instancetype)customLayoutElementVideoResolution:(NemoVideoResolution)videoResolution
                                     participantId:(int)participantId
                                          priority:(NemoLayoutPriority)priority
                                           quality:(NemoVideoQuality)quality
{
    return [[NemoCustomLayoutElement alloc]initWithVideoResolution:videoResolution
                                                     participantId:participantId
                                                          priority:priority
                                                           quality:quality];
}

#pragma mark - Reference 参考
+ (instancetype)layoutPeopleHDStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_720P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_Normal
                                                               quality:NemoVideoQuality_High];
}

+ (instancetype)layoutPeopleThumbStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_180P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_Low
                                                               quality:NemoVideoQuality_Base];
}

+ (instancetype)layoutContentHDStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_1080P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_High
                                                               quality:NemoVideoQuality_High];
}

+ (instancetype)layoutContentThumbStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_720P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_Low
                                                               quality:NemoVideoQuality_Base];
}


+ (instancetype)layoutSymmetricOnlyStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_360P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_High
                                                               quality:NemoVideoQuality_Normal];
    
}

+ (instancetype)layoutSymmetricMultipleStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_360P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_Normal
                                                               quality:NemoVideoQuality_Normal];
}


+ (instancetype)layoutAsymmetricOnlyStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_360P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_High
                                                               quality:NemoVideoQuality_Normal];
    
}

+ (instancetype)layoutAsymmetricMultipleStream:(int)participantId{
    return [NemoCustomLayoutElement customLayoutElementVideoResolution:NemoVideoResolution_360P
                                                         participantId:participantId
                                                              priority:NemoLayoutPriority_Low
                                                               quality:NemoVideoQuality_Base];
}

@end
